package wiki.hitime.stl.daq.config;

import wiki.hitime.stl.daq.web.interceptor.HandlerAccessInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * @author zhangdaoping
 * @create 2019-07-25 17:20
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Resource
    private HandlerAccessInterceptor handlerAccessInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(handlerAccessInterceptor);
    }

}
